#include "stdafx.h"
#include "Ant.h"
#include "Forage.h"

CAnt antList[kMaxAnts];

void CAnt::New(int theType, int theRow, int theCol)
{
	m_pCurState = CForage::instance();
	type = theType;
	row = theRow;
	col = theCol;
}

void CAnt::changeState(CState *pNewState)
{
	m_pCurState->Exit(this);
	m_pCurState = pNewState;
	m_pCurState->Enter(this);
}

void CAnt::update()
{
	if(m_pCurState)
		m_pCurState->Execute(this);
}